<%@ page pageEncoding="UTF-8" %>    <%-- 设置显示编码 --%>
<%
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath() + "/";
%>
<html>
<head>
    <title>沐言科技：www.yootk.com</title>
    <base href="<%=basePath%>">
</head>
<body>
<%
    String error = request.getParameter("error"); // 保存错误信息
    if (!(error == null || "".equals(error))) { // 现在有数据
%>
        <h1>登录失败，错误的用户名或密码！</h1>
<%
    }
%>
<form action="/pages/check.jsp" method="post">
    用户名：<input type="text" name="uname" value="muyan"><br>
    密码：<input type="password" name="upass" value="yootk"><br>
    验证码：<input type="text" maxlength="4" size="4" name="code"><img src="/pages/image.jsp"><br>
    <button type="submit">登录</button>
    <button type="reset">重置</button>
</form>
</body>
</html>